<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
        个人主页 - Dotamax
    </title>

    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/global.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/popModal.css">
    <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!--<link rel="stylesheet" type="text/css" href="/static/bets/css/buttons.css"/>-->
    <link href="__PUBLIC__/css/home_person/font-awesome.min.css" rel="stylesheet" type="text/css">
    <script src="__PUBLIC__/js/home_person/hm.js"></script>
    <script src="__PUBLIC__/js/home_person/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/js/home_person/popModal.js" type="text/javascript" charset="utf-8"></script>
    <script src="__PUBLIC__/js/home_person/jquery.lazyload.2.js" type="text/javascript" charset="utf-8"></script>

    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/normalize.css" />
    <!-- <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/htmleaf-demo.css"> -->
    <link rel="stylesheet" href="__PUBLIC__/css/home_person/style.css" type="text/css" />


    <script type="text/javascript">
        var language = "zh-cn",
            pkey = encodeURIComponent("MTQ4Mjc1MjE2OS4wMjE4ODU1MTU5OTIwXzFjZXBsYmNqbXZkZmNxdGpk"),
            post_pkey = "MTQ4Mjc1MjE2OS4wMjE4ODU1MTU5OTIwXzFjZXBsYmNqbXZkZmNxdGpk",
            steam_id = "101115571",
            account_type = "1",
            account_name = "18855159920";

        function bindCheck() {
            if (account_type == 1 || account_type == 5) {
                $("#notice-11").notifyModal({
                    duration: -1,
                    type: "notify"
                });
            } else {
                $("#notice-10").notifyModal({
                    duration: -1,
                    type: "notify"
                });
            }
        }
        $(function () {
            accountCheck();
        });
    </script>
    <script src="__PUBLIC__/js/home_person/common.js" type="text/javascript" charset="utf-8"></script>

    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?575895fe09d48554a608faa5ef059555";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/account.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/library.css">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/home_person/my_bid_list.css">
    <script type="text/javascript" src="__PUBLIC__/js/home_person/util.min.js"></script>
</head>

<body style="height:660px">
    <div id="top-nav">
        <div class="global-container clearfix">
            <div class="nav-header">
                <a href="<{:U('Home/Index/index')}>">
                    <img src="__PUBLIC__/images/home_person/dotamax_logo_nav.png">
                </a>
            </div>
            <div class="nav-main">
                <ul class="clearfix">
                    <li><a href="<{:U('Home/Index/index')}>">首页</a>
                    </li>
                    <li><a href="<{:U('Home/Hero/index')}>">英雄资料</a>
                        <!-- <div class="nav-item-list hide" style="opacity: 0;"><a href="http://www.dotamax.com/hero/rate/">英雄</a><a href="http://www.dotamax.com/item/">物品</a>
                        </div> -->
                    </li>
                    <li><a href="<{:U('Home/Video/index')}>">视频站</a>
                    </li>
                    <li><a href="<{:U('Home/Chat/index',array('id'=>$_SESSION['u_id']))}>">聊天室</a>
                    </li>
                    <li><a href="<{:U('Home/Topic/index')}>">论坛</a>
                    </li>
                    <li><a href="<{:U('Home/Store/index')}>">商城</a>
                    </li>
                </ul>
            </div>
            <div class="nav-right">
                <div class="account-wrap">
                    <div href="/bets/account/" class="account-info-wrap clearfix">
                        <div class="arrow"><i class="glyphicon glyphicon-chevron-down"></i>
                        </div>
                        <div class="name ellipsis"></div>
                        <div class="avator" id="nav-icon">
                            <if condition="$data[0]['icon'] eq '' ">
                                <img src="__PUBLIC__/images/home_person/default_icon.jpg">
                                <else />
                                <img src="<{$iconpath}><{$data[0]['icon']}>">
                            </if>
                        </div>
                        <div class="menu-wrap" style="display: none;">
                            <ul class="menu">
                                <li>
                                    <a href="<{:U('Home/User/index')}>"><i class="glyphicon glyphicon-user"></i>
                                    <if condition="$_SESSION['nickname']"><{$_SESSION['nickname']}>
                                    <else /><{$_SESSION['email']}>
                                    </if>
                                    </a>
                                </li>
                                <li><a href="<{:U('Index/logout')}>"><i class="glyphicon glyphicon-off"></i>注销账号</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <!-- main -->
    <div id="main-wrap" class="global-container" style="max-height:680px">
        <div class="window-height hide"></div>
        <div class="layout-container clearfix" style="min-height: 800px;;display: block;">
            <div class="main-container">
                <div class="page-nav"><a href="javascript:void(0)">个人中心</a><span class="title">我的帖子</span>
                </div>
                <div class="account-config-panel">
                    <div class="nav-panel panel-max-lib" style="display: block;">
                        <div class="lib max-lib">
                            <div class="filter-wrap row">
                                <div id="nav_topic_edit" class="filter-wrap row">
                                    <div class="btn btn-filter all active" data-filter="">我的主题</div>
                                    <div class="btn btn-filter getting" data-filter="getting">收藏的帖子</div>
                                    <!-- <div class="btn btn-filter betting" data-filter="">回收站</div> -->
                                </div>
                            </div>
                            <div class="list-wrap" style="padding:10px;min-height:495px">
                                <div id="topic_0">
                                    <if condition="$topic">
                                        <center>
                                            <table id="mytopic" class="table" style="font-size:14px;">
                                                <tr class="record-list-panel" height=35px style="font-size:15px">
                                                    <th width='40%'>主题</th>
                                                    <th width='20%'>发表时间</th>
                                                    <th width='20%'>操作</th>
                                                </tr>
                                                <tr>
                                                    <td height=10px></td>
                                                </tr>
                                                <volist name="topic" id='vo'>
                                                    <tr class="record-list-panel" height=27px>
                                                        <td align='center' style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">
                                                            <{$vo.title}>
                                                        </td>
                                                        <td align='center'>
                                                            <{$vo.createtime|date="Y-m-s H:i:s" ,###}>
                                                        </td>
                                                        <td align='center'>
                                                            <a href="<{:U('Topic/theme',array('t'=>$vo['t_id']))}>">查看</a>
                                                            <a href="">删除</a>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td height=10px></td>
                                                    </tr>
                                                </volist>
                                            </table>
                                        </center>
                                        <script>
                                            $('#mytopic a:contains("删除")').click(function () {
                                                if (!confirm('确认删除?')) {
                                                    return false;
                                                }
                                                var tr = $(this).parents('tr');
                                                $.ajax({
                                                    url: "<{:U('User/delbyperson',array('t'=>$vo['t_id']))}>",
                                                    success: function (data) {
                                                        if (data == 1) {
                                                            alert('删除成功');
                                                            tr.remove();
                                                        } else {
                                                            alert('删除失败');
                                                        }
                                                    }
                                                })
                                            })
                                        </script>
                                        <else/>
                                        <div class="list-detail clearfix">
                                            <p class="notice-empty warn-lib-empty">您还没有发过帖子</p>
                                        </div>
                                    </if>
                                </div>
                                <div id="topic_1" style="display:none;">
                                    <if condition="$topic_collect">
                                        <center>
                                            <table id="mycollect" class="table" style="font-size:14px;">
                                                <tr class="record-list-panel" height=35px style="font-size:15px">
                                                    <th width='40%'>主题</th>
                                                    <th width='20%'>发表时间</th>
                                                    <th width='20%'>操作</th>
                                                </tr>
                                                <tr>
                                                    <td height=10px></td>
                                                </tr>
                                                <volist name="topic_collect" id='vo'>
                                                    <tr class="record-list-panel" height=27px>
                                                        <td align='center' style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">
                                                            <{$vo.title}>
                                                        </td>
                                                        <td align='center'>
                                                            <{$vo.createtime|date="Y-m-s H:i:s" ,###}>
                                                        </td>
                                                        <td align='center'>
                                                            <a href="<{:U('Topic/theme',array('t'=>$vo['t_id']))}>">查看</a>
                                                            <a style="cursor:pointer" tid="<{$vo.t_id}>">取消收藏</a>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td height=10px></td>
                                                    </tr>
                                                </volist>
                                            </table>
                                        </center>
                                        <script>
                                            $('#mycollect a:contains("取消收藏")').click(function () {
                                                var tid = $(this).attr('tid');
                                                var tr = $(this).parents('tr');
                                                $.ajax({
                                                    url: "<{:U('Topic/topic_uncollect',array('uid'=>$_SESSION['uid']))}>",
                                                    data: {
                                                        'tid': tid
                                                    },
                                                    type: 'get',
                                                    success: function (data) {
                                                        if (data == 1) {
                                                            alert('取消成功');
                                                            tr.remove();
                                                        } else {
                                                            alert('取消失败');
                                                        }
                                                    }
                                                })
                                            })
                                        </script>
                                        <else/>
                                        <div class="list-detail clearfix">
                                            <p class="notice-empty warn-lib-empty">您还没有收藏过帖子</p>
                                        </div>
                                    </if>
                                </div>
                            </div>
                        </div>
                    </div>
                    <script>
                        var c1 = $('#nav_topic_edit div').eq(0).css('color');
                        var c2 = $('#nav_topic_edit div').eq(1).css('color');
                        $('#nav_topic_edit div').mouseover(
                            function () {
                                $(this).css('color', "#B72B13").mouseout(function () {
                                    $(this).css('color', c2);
                                });
                            })
                        for (var i = 0; i < $('#nav_topic_edit div').length; i++) {
                            (function (i) {
                                $('#nav_topic_edit div').eq(i).click(function () {
                                    $(this).css('color', c1).off('mouseout').siblings().css('color', c2);
                                    $('#topic_' + i).css('display', 'block').siblings().css('display', 'none');
                                })
                            })(i)
                        }
                    </script>
                    <!-- 我的好友 -->
                    <div class="nav-panel panel-steam-lib" style="display: none;">
                        <div class="lib max-lib">
                            <div id="nav_msg_edit1" class="filter-wrap row">
                                <div class="btn btn-filter all active" data-filter="">我关注的</div>
                                <div class="btn btn-filter betting" data-filter="">我的粉丝</div>
                            </div>
                            <div class="list-wrap" style="min-height:510px">
                                <div id="max-lib" class="list-detail clearfix" style="padding:30px">
                                    <div id="edit1_0">
                                        <table class="table">
                                            <tr>
                                                <th>用户头像</th>
                                                <th>用户名</th>
                                                <th>操作</th>
                                            </tr>
                                            <tr>
                                                <td colspan="3"></td>
                                            </tr>
                                            <volist name="oxlist" id="vo">
                                                <tr style="text-align:center;">
                                                    <if condition="$vo['icon'] eq ''">
                                                        <td>
                                                            <img src="__PUBLIC__/images/home_person/default_icon.jpg" width="50">
                                                        </td>
                                                        <else />
                                                        <td>
                                                            <img src="<{$vo.icon}>" width="50">
                                                        </td>
                                                    </if>
                                                    <if condition="$vo['nickname'] eq ''">
                                                        <td>
                                                            <{$vo.email}>
                                                        </td>
                                                        <else />
                                                        <td>
                                                            <{$vo.nickname}>
                                                        </td>
                                                    </if>
                                                    <td><a href="<{:U('Home/User/detail?uid='.$vo['ui_id'])}>">查看</a>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2"></td>
                                                </tr>
                                            </volist>
                                        </table>
                                    </div>

                                    <div id="edit1_1" style="display:none">
                                        <table class="table">
                                            <tr>
                                                <th>用户头像</th>
                                                <th>用户名</th>
                                                <th>操作</th>
                                            </tr>
                                            <volist name="fanslist" id="vo">
                                                <tr>
                                                    <if condition="$vo['icon'] eq ''">
                                                        <td>
                                                            <img src="__PUBLIC__/images/home_person/default_icon.jpg" width="50">
                                                        </td>
                                                        <else />
                                                        <td>
                                                            <img src="<{$vo.icon}>" width="50">
                                                        </td>
                                                    </if>
                                                    <if condition="$vo['nickname'] eq ''">
                                                        <td style="text-align:center;">
                                                            <{$vo.email}>
                                                        </td>
                                                        <else />
                                                        <td style="text-align:center;">
                                                            <{$vo.nickname}>
                                                        </td>
                                                    </if>
                                                    <td style="text-align:center;"><a href="<{:U('Home/User/detail?uid='.$vo['ui_id'])}>">查看</a>
                                                    </td>
                                                </tr>
                                            </volist>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 选项卡  -->
                    <script>
                        var c1 = $('#nav_msg_edit1 div').eq(0).css('color');
                        var c2 = $('#nav_msg_edit1 div').eq(1).css('color');
                        $('#nav_msg_edit1 div').mouseover(
                            function () {
                                $(this).css('color', "#B72B13").mouseout(function () {
                                    $(this).css('color', c2);
                                });
                            })
                        for (var i = 0; i < $('#nav_msg_edit1 div').length; i++) {
                            (function (i) {
                                $('#nav_msg_edit1 div').eq(i).click(function () {
                                    $(this).css('color', c1).off('mouseout').siblings().css('color', c2);
                                    $('#edit1_' + i).css('display', 'block').siblings().css('display', 'none');
                                })
                            })(i)
                        }
                    </script>
                    <!-- 留言板 -->
                    <div class="nav-panel panel-bid-list" style="display: none;min-height:575px">
                        <div class="record-list-panel clearfix">
                            <table class="table">
                                <tr>
                                    <th>时间</th>
                                    <th>用户头像</th>
                                    <th>用户名</th>
                                    <th>内容</th>
                                    <th>操作</th>
                                </tr>
                                <volist name="message" id="vo">
                                    <tr style="text-align:center;">
                                        <td>
                                            <{$vo.addtime|date="Y-m-d H:i:s" ,###}>
                                        </td>
                                        <if condition="$vo['icon'] eq ''">
                                            <td>
                                                <img src="__PUBLIC__/images/home_person/default_icon.jpg" width="50">
                                            </td>
                                            <else />
                                            <td>
                                                <img src="<{$vo.icon}>" width="50">
                                            </td>
                                        </if>
                                        <if condition="$vo['nickname'] eq ''">
                                            <td>
                                                <{$vo.email}>
                                            </td>
                                            <else />
                                            <td>
                                                <{$vo.nickname}>
                                            </td>
                                        </if>
                                        <td>
                                            <{$vo.m_content}>
                                        </td>
                                        <td style="display:none;">
                                            <{$vo.m_id}>
                                        </td>
                                        <td class="delMess">删除</td>
                                    </tr>
                                </volist>
                            </table>
                        </div>
                    </div>
                    <script>
                        $('.delMess').click(function () {
                            var mid = $(this).prev().html();
                            $(this).parents('tr').remove();
                            $.ajax({
                                type: 'post',
                                url: "<{:U('Home/User/delMessage')}>",
                                data: 'mid=' + mid
                            });
                        });
                    </script>
                    <!-- 我的收藏 -->
                    <div class="nav-panel panel-lib-record" style="display: none;min-height:575px">
                        <div class="record-list-panel clearfix" style="text-align:center;">
                            <div class="record-list-head">
                                <div class="td item-time" style="text-align:center;">时间</div>
                                <div class="td item-desc">商品图片</div>
                                <div class="td item-count">商品名</div>
                                <div class="td item-status" style="text-align:left;">操作</div>
                            </div>
                            <div id="lib-record-loading">
                                <table class="table table-striped b-t b-light">
                                    <volist name="list2" id="vo">
                                        <tr>
                                            <td>
                                                <{$vo.coll_time|date="Y-m-d H:i:s" ,###}>
                                            </td>
                                            <td>
                                                <img src="/Uploads/Store/<{$vo.g_icon}>" width="50">
                                            </td>
                                            <td></td>
                                            <td>
                                                <{$vo.g_name}>
                                            </td>
                                            <td>
                                                <a href="<{:U('Home/Store/detail?gid='.$vo['g_id'])}>">查看</a>
                                                <a class="xcDel">删除</a>
                                                <span style="display:none;"><{$vo.g_id}></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="5"></td>
                                        </tr>
                                    </volist>
                                </table>
                            </div>
                            <ul id="lib-record-panel"></ul>
                        </div>
                    </div>
                    <script>
                        $('.xcDel').click(function () {
                            var gid = $(this).next().html();
                            $(this).parents('tr').remove();
                            $.ajax({
                                type: 'post',
                                url: "<{:U('Home/User/delCollection')}>",
                                data: "gid=" + gid
                            });
                        });
                    </script>
                    <!-- 交易记录 -->
                    <div class="nav-panel panel-exc-record" style="display: none;min-height:575px;font-size:14px;">
                        <table class="table table-striped b-t b-light">
                            <tr>
                                <th>时间</th>
                                <th>订单号</th>
                                <th>商品id</th>
                                <th>商品名称</th>
                                <th>价格</th>
                                <th>数量</th>
                                <th>操作</th>
                            </tr>
                            <volist name="list" id="vo">
                                <tr style="text-align:center;">
                                    <td>
                                        <{$vo.addtime|date="Y-m-d H:i:s" ,###}>
                                    </td>
                                    <td>
                                        <{$vo.o_rand_id}>
                                    </td>
                                    <td class="Hidden myRand">
                                        <{$vo.o_d_id}>
                                    </td>
                                    <td>
                                        <{$vo.g_name}>
                                    </td>
                                    <td>
                                        <{$vo.price}>
                                    </td>
                                    <td>
                                        <{$vo.o_d_num}>
                                    </td>
                                    <td>
                                        <button class="btn btn-danger myDel">删除</button>
                                    </td>
                                </tr>
                            </volist>
                        </table>
                    </div>
                    <script>
                        $('.myDel').click(function () {
                            var id = $(this).parent().prevAll('.myRand').html();
                            $(this).parents('tr').remove();
                            $.ajax({
                                type: 'post',
                                url: '<{:U("Home/Order/del")}>',
                                data: 'id=' + id,
                                dataType: 'json'
                            });
                        });
                    </script>
                    <!--个人资料-->
                    <div class="nav-panel panel-trade-link" style="display: none;">
                        <div class="panel-max-lib">
                            <div class="lib max-lib">
                                <div id="nav_msg_edit" class="filter-wrap row">
                                    <div class="btn btn-filter all active" data-filter="">资料修改</div>
                                    <div class="btn btn-filter betting" data-filter="">更换头像</div>
                                    <div class="btn btn-filter getting" data-filter="getting">修改密码</div>
                                    <div class="btn btn-filter getting" data-filter="getting">密保问题</div>
                                </div>
                                <div class="list-wrap" style="min-height:510px">
                                    <div id="max-lib" class="list-detail clearfix" style="padding:30px">
                                        <!-- <p class="notice-empty warn-lib-empty">您的竞猜库存空空如也</p> -->
                                        <div id="edit_0">
                                            <!--资料修改-->
                                            <center>
                                                <form id='info'>
                                                    邮箱:　
                                                    <input type="text" name='email' value="<{$data[0]['email']}>" readonly>
                                                    <br>
                                                    <br>昵称:　
                                                    <input type="text" name='nickname' value="<{$data[0]['nickname']}>">
                                                    <br>
                                                    <br>手机:　
                                                    <input type="text" name='phone' value="<{$data[0]['phone']}>">
                                                    <br>
                                                    <br>性别:　
                                                    <label>
                                                        <input type="radio" name='sex' value="0" <if condition="$data[0][sex] eq '0'">checked</if>>男</label>
                                                    <label>
                                                        <input type="radio" name='sex' value="1" <if condition="$data[0][sex] eq '1'">checked</if>>女</label>
                                                    <br>
                                                    <br>生日:　
                                                    <input type="date" name='birthday' value="<{$data[0]['birthday']}>">
                                                    <br>
                                                    <br>
                                                    <input type="hidden" name='ui_id' value="<{$data[0]['ui_id']}>">
                                                    <div id="save-link" class="btn btn-confirm ">保存</div>
                                                </form>
                                            </center>
                                        </div>

                                        <div id="edit_1" style="display:none">
                                            <!--头像修改-->
                                            <center>
                                                <div class="htmleaf-container">
                                                    <div class="container">
                                                        <div class="imageBox">
                                                            <div class="thumbBox"></div>
                                                            <div class="spinner" style="display: none">请选择头像...</div>
                                                        </div>
                                                        <div class="action">
                                                            <div class="new-contentarea tc">
                                                                <a href="javascript:void(0)" class="upload-img">
                                                                    <label for="upload-file">上传头像</label>
                                                                </a>
                                                                <input type="file" class="" name="upload-file" id="upload-file" />
                                                            </div>
                                                            <input type="button" id="btnCrop" class="Btnsty_peyton" value="保存">
                                                            <input type="button" id="btnZoomIn" class="Btnsty_peyton" value="+">
                                                            <input type="button" id="btnZoomOut" class="Btnsty_peyton" value="-">
                                                        </div>
                                                        <div class="cropped"></div>
                                                    </div>
                                                </div>
                                                <!--JQ插件 上传裁剪头像-->
                                                <script src="__PUBLIC__/js/home_person/jquery.min.js" type="text/javascript"></script>
                                                <script>
                                                    window.jQuery || document.write('<script src="__PUBLIC__/js/home_person/jquery-1.11.0.min.js"><\/script>')
                                                </script>
                                                <script type="text/javascript" src="__PUBLIC__/js/home_person/cropbox.js"></script>
                                                <script type="text/javascript">
                                                    $(window).load(function () {
                                                        var options = {
                                                            thumbBox: '.thumbBox',
                                                            spinner: '.spinner',
                                                        }
                                                        var cropper = $('.imageBox').cropbox(options);
                                                        $('#upload-file').on('change', function () {
                                                            var reader = new FileReader();
                                                            reader.onload = function (e) {
                                                                options.imgSrc = e.target.result;
                                                                cropper = $('.imageBox').cropbox(options);
                                                            }
                                                            reader.readAsDataURL(this.files[0]);
                                                            this.files = [];
                                                        })
                                                        $('#btnCrop').on('click', function () {
                                                            var img = cropper.getDataURL();
                                                            //保存头像到本地
                                                            $.ajax({
                                                                type: 'post',
                                                                url: "<{:U('Home/User/icon_upload')}>",
                                                                data: {
                                                                    src: img
                                                                },
                                                                success: function (data) {
                                                                    alert(data);
                                                                }
                                                            })
                                                        })
                                                        $('#btnZoomIn').on('click', function () {
                                                            cropper.zoomIn();
                                                        })
                                                        $('#btnZoomOut').on('click', function () {
                                                            cropper.zoomOut();
                                                        })
                                                    });
                                                </script>
                                            </center>
                                        </div>
                                        <div id="edit_2" style="display:none">
                                            <!--密码修改-->

                                            <center>
                                                <form id='check_question'>
                                                    请选择问题:　
                                                    <select style="width: 190px; height: 30px;border:1px solid #333333;background-color: #1B1B1B; font: 14px/20px Microsoft YaHei;color: #fff;" id="pwd_question">
                                                        <option value=''>&nbsp;&nbsp;&nbsp;----请选择密保问题----</option>
                                                        <option value="你父亲的名字是?">你父亲的名字是?</option>
                                                        <option value="你的出生地是?">你的出生地是?</option>
                                                        <option value="你配偶的名字是?">你配偶的名字是?</option>
                                                        <option value="你的高中学校是?">你的高中学校是?</option>
                                                        <option value="你的性别是?">你的性别是?</option>
                                                    </select>
                                                    <br>
                                                    <br>　密保答案:　
                                                    <input type="text" id="pwd_answer">
                                                    <br>
                                                    <br>
                                                    <div id="pwd_sub" class="btn btn-confirm ">确定</div>
                                                </form>

                                                <form id='pwd_edit' style="display:none">
                                                    原密码:　　　
                                                    <input type="password" name="pwd">
                                                    <br>
                                                    <br>新密码:　　　
                                                    <input type="password" name="npwd">
                                                    <br>
                                                    <br>重复新密码:　
                                                    <input type="password" name="rpwd">
                                                    <br>
                                                    <br>
                                                    <div id="save-pwd" class="btn btn-confirm ">保存</div>
                                                </form>
                                                <div style="height:195px"></div>
                                            </center>
                                        </div>
                                        <div id="edit_3" style="display:none">
                                            <!--设置密保问题-->
                                            <center>
                                                <form id='question_set'>

                                                    请选择问题:　
                                                    <select style="width: 190px; height: 30px;border:1px solid #333333;background-color: #1B1B1B; font: 14px/20px Microsoft YaHei;color: #fff;" id="question">
                                                        <option value=''>&nbsp;&nbsp;&nbsp;----请选择密保问题----</option>
                                                        <option value="你父亲的名字是?">你父亲的名字是?</option>
                                                        <option value="你的出生地是?">你的出生地是?</option>
                                                        <option value="你配偶的名字是?">你配偶的名字是?</option>
                                                        <option value="你的高中学校是?">你的高中学校是?</option>
                                                        <option value="你的性别是?">你的性别是?</option>
                                                    </select>
                                                    <br>
                                                    <br>　密保答案:　
                                                    <input type="text" id="answer">
                                                    <br>
                                                    <br>
                                                    <div class="btn btn-confirm ">保存</div>
                                                    <div class="btn btn-confirm" style="display:none">重置</div>
                                                </form>
                                                <script>
                                                    $.ajax({
                                                        url: "<{:U('User/check_question',array('uid'=>$_SESSION['uid']))}>",
                                                        success: function (data) {
                                                            if (data) {
                                                                $('#question').val(data).attr('disabled', true);
                                                                $('#answer').val('已设置').attr('disabled', true);
                                                                $('#question_set div:contains("保存")').css('display', 'none');
                                                                $('#question_set div:contains("重置")').css('display', 'block');
                                                            }
                                                        }
                                                    })

                                                     $('#question_set div:contains("保存")').click(function () {
                                                        var question = $('#question').val();
                                                        var answer = $('#answer').val();
                                                        if (question == '') {
                                                            alert('请选择一个问题');
                                                            return false;
                                                        }
                                                        if (answer == '') {
                                                            alert('请输入密码');
                                                            return false;
                                                        }
                                                        $.ajax({
                                                            url: "<{:U('User/question_set',array('uid'=>$_SESSION['uid']))}>",
                                                            type: 'post',
                                                            data: {
                                                                'question': question,
                                                                'answer': answer
                                                            },
                                                            success: function (data) {
                                                                if (data == 1) {
                                                                    alert('设置成功');
                                                                    $('#question').attr('disabled', true);
                                                                    $('#answer').val('已设置').attr('disabled', true);
                                                                    $('#question_set div:contains("保存")').css('display', 'none');
                                                                    $('#question_set div:contains("重置")').css('display', 'block');
                                                                } else {
                                                                    alert('设置失败');
                                                                }
                                                            }
                                                        })
                                                    })

                                                     $('#question_set div:contains("重置")').click(function () {
                                                        $('#modal').css('display', 'block');
                                                        var i = -30;
                                                        var timmer = setInterval(function () {
                                                            if (i == 30) {
                                                                clearInterval(timmer);
                                                            }
                                                            $('#modal_div').css('top', i + '%');
                                                            i++;
                                                        }, 5);

                                                    })
                                                </script>
                                                <div style="height:195px"></div>
                                            </center>
                                        </div>
                                    </div>
                                    <!-- 密码修改 -->
                                    <script>
                                        $('#pwd_sub').click(function () {
                                            var question = $('#pwd_question').val();
                                            var answer = $('#pwd_answer').val();
                                            if (question == '') {
                                                alert('请选择一个问题');
                                                return false;
                                            }
                                            if (answer == '') {
                                                alert('请输入密码');
                                                return false;
                                            }
                                            $.ajax({
                                                url: "<{:U('User/check_pwdquestion',array('uid'=>$_SESSION['uid']))}>",
                                                type: 'post',
                                                data: {
                                                    'question': question,
                                                    'answer': answer
                                                },
                                                success: function (data) {
                                                    if (data == 1) {
                                                        $('#check_question').css('display', 'none');
                                                        $('#pwd_edit').css('display', 'block');
                                                    } else {
                                                        alert('密保答案错误');
                                                    }
                                                }
                                            })
                                        })
                                         $('#save-pwd').click(function () {
                                            var new_pwd = $("#pwd_edit input").eq(1).val();
                                            var re_pwd = $("#pwd_edit input").eq(2).val();
                                            if (new_pwd.length < 6) {
                                                alert('密码长度最少6位');
                                                return false;
                                            }
                                            if (new_pwd != re_pwd) {
                                                alert('两次密码不一致!!!');
                                                return false;
                                            }
                                            var info = $('#pwd_edit input').serialize();
                                            $.ajax({
                                                type: 'post',
                                                url: "<{:U('Home/User/pwd_edit')}>",
                                                data: info,
                                                // dataType:'json',
                                                success: function (data) {
                                                    alert(data);
                                                    $('#pwd_edit input').val('');
                                                }
                                            })

                                        })
                                    </script>

                                    <!-- 选项卡  -->
                                    <script>
                                        var c1 = $('#nav_msg_edit div').eq(0).css('color');
                                        var c2 = $('#nav_msg_edit div').eq(1).css('color');
                                        $('#nav_msg_edit div').mouseover(
                                            function () {
                                                $(this).css('color', "#B72B13").mouseout(function () {
                                                    $(this).css('color', c2);
                                                });
                                            })
                                        for (var i = 0; i < $('#nav_msg_edit div').length; i++) {
                                            (function (i) {
                                                $('#nav_msg_edit div').eq(i).click(function () {
                                                    $(this).css('color', c1).off('mouseout').siblings().css('color', c2);
                                                    $('#edit_' + i).css('display', 'block').siblings().css('display', 'none');
                                                })
                                            })(i)
                                        }
                                    </script>
                                    <!-- 资料修改 ajax -->
                                    <script>
                                        $('#info input:eq(0)').click(function () {
                                            alert('邮箱不可以更改');
                                            return false;
                                        })

                                         $('#save-link').click(function () {
                                            var info_nick = $('#info input:eq(1)').val();
                                            var info_phone = $('#info input:eq(2)').val();
                                            var info_sex = $('#info input:checked').val();
                                            var info_day = $('#info input:eq(5)').val();
                                            var info = $('#info input').serialize();
                                            $.ajax({
                                                type: 'post',
                                                data: info,
                                                url: "<{:U('Home/User/edit')}>",
                                                success: function (data) {
                                                    if (data == 1) {
                                                        alert('修改成功');
                                                        $('#info input:eq(1)').val(info_nick);
                                                        $('#info input:eq(2)').val(info_phone);
                                                        $('#info input:eq(4)').val(info_day);
                                                    } else {
                                                        alert('修改失败');
                                                    }
                                                }
                                            })
                                        })
                                    </script>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 账户充值 -->
                    <div class="nav-panel panel-account-wallet" style="display: none;min-height:575px">
                        <div class="wealth-panel">
                            <div class="clearfix">
                                <div class="btn btn-confirm buy-mdiamonds myStyle1">RMB充值</div>
                                <div class="btn btn-new buy-mdiamonds myStyle2">积分兑换</div>
                                <div class="myXc" style="display:none;">1</div>
                            </div>
                        </div>
                        <div class="buy-panel">
                            <div class="nav-panel panel-buy-mdiamonds">
                                <div class="row myCoin1" style="display:block;">
                                    <div class="label">刀币余额</div>
                                    <div class="cont current-md">
                                        <{$dotacoin}>
                                    </div>
                                </div>
                                <div class="row myCoin2" style="display:none;">
                                    <div class="label">我的积分</div>
                                    <div class="cont current-md myScore">
                                        <{$score}>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="label">充值账号</div>
                                    <div class="cont">
                                        <{$data[0][ 'email']}>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="label">选择额度</div>
                                    <div class="cont type clearfix">
                                        <div class="btn btn-new buy-type" data-type="200">200
                                            <input type="checkbox" class="hide" value="200" name="buy-type">
                                        </div>
                                        <div class="btn btn-new buy-type" data-type="500">500
                                            <input type="checkbox" class="hide" value="500" name="buy-type">
                                        </div>
                                        <div class="btn btn-new buy-type" data-type="1000">1000
                                            <input type="checkbox" class="hide" value="1000" name="buy-type">
                                        </div>
                                        <div class="btn btn-new buy-type" data-type="5000">5000
                                            <input type="checkbox" class="hide" value="5000" name="buy-type">
                                        </div>
                                        <div class="btn btn-new buy-type" data-type="20000">20000
                                            <input type="checkbox" class="hide" value="20000" name="buy-type">
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="label myRmb">实付金额</div>
                                    <div class="cont"><span class="actual">￥ <span id="rmb">0</span></span><span class="tip">( 1 RMB = 100 刀币 1 刀币 = 100 积分)</span>
                                    </div>
                                </div>
                                <div id="buy-md-confirm" class="btn buy-confirm">确认充值</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <script>
                $('.myStyle1').click(function () {
                    $(this).removeClass('btn-new').addClass('btn-confirm').siblings('.myStyle2').removeClass('btn-new').addClass('btn-new');
                    $('.myXc').html('1');
                    $('.myCoin1').css('display', 'block');
                    $('.myCoin2').css('display', 'none');
                    $('.myRmb').html('实付金额');
                    $('.buy-type').removeClass('btn-new').addClass('btn-new');
                    $('.actual').html('￥ <span id="rmb">0</span></span>');
                });

                $('.myStyle2').click(function () {
                    $(this).removeClass('btn-new').addClass('btn-confirm').siblings('.myStyle1').removeClass('btn-new').addClass('btn-new');
                    $('.myXc').html('2');
                    $('.myCoin1').css('display', 'none');
                    $('.myCoin2').css('display', 'block');
                    $('.myRmb').html('需要积分');
                    $('.buy-type').removeClass('btn-new').addClass('btn-new');
                    $('.actual').html('<span id="rmb">0</span></span>');
                });

                $('.buy-type').click(function () {
                    $(this).removeClass('btn-new').addClass('btn-confirm').siblings('.buy-type').removeClass('btn-new').addClass('btn-new');
                    if ($('.myXc').html() == 2) {
                        $('#rmb').html($(this).data("type") * 10);
                    } else {
                        $('#rmb').html($(this).data("type") / 10);
                    }
                });

                $('#buy-md-confirm').click(function () {
                    if ($('.myXc').html() == 1) {
                        var coin = $('#rmb').html() * 10;
                        $.ajax({
                            type: 'post',
                            url: "<{:U('Home/User/addCoin')}>",
                            data: 'coin=' + coin,
                            dataType: 'json',
                            success: function (msg) {
                                if (msg != false) {
                                    alert('充值成功');
                                }
                            }
                        });
                    } else {
                        var score = $('#rmb').html() / 10;
                        if (score > $('.myScore').html()) {
                            alert('积分不足');
                            return false;
                        }
                        $.ajax({
                            type: 'post',
                            url: "<{:U('Home/User/delScore')}>",
                            data: 'score=' + score,
                            dataType: 'json',
                            success: function (msg) {
                                if (msg != false) {
                                    alert('充值成功');
                                }
                            }
                        });
                    }
                });
            </script>
            <div class="side-container">
                <div class="user-panel">
                    <div class="bg-wrap"></div>
                    <div class="avator-wrap">
                        <div class="img-box" id="right_icon">
                            <if condition="$data[0]['icon'] eq '' ">
                                <img src="__PUBLIC__/images/home_person/default_icon.jpg">
                                <else />
                                <img src="<{$iconpath}><{$data[0]['icon']}>">
                            </if>
                        </div>
                        <div class="user-name"></div>
                    </div>
                    <div class="account-info-wrap">
                        <div class="row">
                            <p class="p1">我关注的</p>
                            <p class="p2">
                                <{$ox}>
                            </p>
                        </div>
                        <div class="row">
                            <p class="p1">我的粉丝</p>
                            <p class="p2">
                                <{$fans}>
                            </p>
                        </div>
                        <div class="row">
                            <p class="p1">钱包</p>
                            <p class="p2 clearfix"><span class="mdiamonds"><img src="__PUBLIC__/images/home_person/mdiamond.png"><span class="val current-md"><{$score}></span></span><span class="mcoins"><img src="__PUBLIC__/images/home_person/mcoin.png"><span class="val current-mc"><{$dotacoin}></span></span><span class="purchase" onclick="$(&#39;#account-wallet-btn&#39;).trigger(&#39;click&#39;);">充值</span>
                            </p>
                        </div>
                    </div>
                </div>
                <div class="account-nav-panel">
                    <ul class="account-nav">
                        <li id="max-lib-btn" data-slide="1" class="current active">
                            <div class="li">我的帖子</div>
                        </li>
                        <li id="steam-lib-btn" data-slide="1">
                            <div class="li">关注与粉丝</div>
                        </li>
                        <li id="bid-list-btn" data-slide="1">
                            <div class="li">留言板</div>
                        </li>
                        <li id="lib-record-btn" data-slide="1">
                            <div class="li">我的收藏</div>
                        </li>
                        <li id="exc-record-btn" data-slide="1">
                            <div class="li">交易记录</div>
                        </li>
                        <li id="trade-link-btn" data-slide="1">
                            <div class="li">个人资料</div>
                        </li>
                        <li id="account-wallet-btn" data-slide="1">
                            <div class="li">账户充值</div>
                        </li>
                    </ul>
                </div>
                <!-- <div class="faq-enter">
                    <p>官方交流QQ群：272847191</p>
                </div> -->
            </div>
        </div>
    </div>

    <div class="back-to-top hide" style="opacity: 0;">TOP</div>
    <!-- foot -->
    <div class="footer" style="display: block;">
        <div class="row">
            <img src="__PUBLIC__/images/home_person/logo_01.png" class="foot-logo breath">
        </div>
    </div>
    <script src="__PUBLIC__/js/home_person/offer.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript">
        /* account nav tabs */
        $(function () {
            var $tab = $(".account-nav > li");
            $tab.click(function () {
                var $panel = $(".nav-panel");
                $(this).addClass("current").siblings("li").removeClass("current");
                var panelNoSlide = $(this).data("slide");
                if (panelNoSlide == 1) {
                    $panel.eq($(this).index()).show().siblings(".nav-panel").hide();
                    console.log($panel.eq($(this).index()));
                } else {
                    $panel.eq($(this).index()).slideDown(300).siblings(".nav-panel").hide();
                }
                $(".page-nav .title").text($(this).find(".li").text());
            });
        });
    </script>
    <!-- modal -->
    <div id="modal" style="position:fixed;width:100%;height:100%;background: rgba(0,0,0,.5);left:0;top:0;display:none">
        <div id="modal_div" style="position:fixed;left:30%;top:-30%;">
            <center>
                <div style="background-image: url(__PUBLIC__/images/home_person/bg_modal.jpg);width: 458px;height: 216px;">
                    <a id="modal_close" style="float:right;padding:6px 10px;cursor:pointer">X</a>
                    <h2 style="margin: 0;padding: 36px 0 12px 0;font-size: 20px;font-weight: normal;color: #c6c6c6;">请输入手机验证码</h2>
                    <br>
                    <input id="phone_yzm" type="text">　
                    <div id="get_yzm" class="btn" style="width:auto;display:inline-block">[ <span id="yzm_tip">获取验证码</span> ]</div>
                    <br>
                    <br>
                    <br>
                    <div class="btn btn-confirm" id="sub_yzm">提交</div>
                </div>
            </center>
        </div>
    </div>
    <script>
        $('#modal_close').click(function () {
            $('#modal').css('display', 'none');
        })

        var timmer1_mark = 1;
        $('#get_yzm').click(function () {
            var rand = Math.ceil(Math.random() * 1000000);
            // alert(rand)
            $.ajax({
                url: "<{:U('User/send_yzm')}>",
                data: {
                    'rand': rand
                }
                // success:function(data){
                //     alert(data)
                // }
            })
            var i = 59;
            if (timmer1_mark == 1) {
                var timmer1 = setInterval(function () {
                    timmer1_mark = 0;
                    $("#yzm_tip").attr('disabled', true).html('请在' + i + '秒内输入');
                    if (i == 0) {
                        $("#yzm_tip").attr('disabled', false).html('获取验证码');
                        clearInterval(timmer1);
                        timmer1_mark = 1;
                    }
                    i--;
                }, 1000)
            }

            $('#sub_yzm').click(function () {
                var yzm = $('#phone_yzm').val();
                if (yzm != rand) {
                    alert('验证码错误');
                    return false;
                }
                $.ajax({
                    url: "<{:U('User/question_reset',array('uid'=>$_SESSION['uid']))}>",
                    success: function (data) {
                        if (data == 1) {
                            $('#modal').css('display', 'none');
                            $('#question').val('').attr('disabled', false);
                            $('#answer').val('').attr('disabled', false);
                            $('#question_set div:contains("保存")').css('display', 'block');
                            $('#question_set div:contains("重置")').css('display', 'none');
                        } else {
                            alert('密保重置失败');
                        }
                    }
                })
            })

        })
    </script>
</body>

</html>